package com.moli.iov.admin.websocket.utils;

import com.moli.iov.rest.RestResponse;
import com.moli.iov.util.JsonUtils;

/**
 * @ClassName MessageUtils
 * @Description TODO
 * @Author 李伟松
 * @CreateDate 2019-03-06 下午 6:21
 * @UpdateDate 2019-03-06 下午 6:21
 * @Version 1.0
 */
public class MessageUtils {

    public static String failure(String message){
        return JsonUtils.toJson(RestResponse.failure(message));
    }

    public static String error(String message){
        return JsonUtils.toJson(RestResponse.paramFailure(message));
    }

    public static String success(Object obj){
        return JsonUtils.toJson(RestResponse.success(obj));
    }

    public static String message(RestResponse rest){
        return JsonUtils.toJson(rest);
    }

}
